home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
pascal
/
shazam.exe
/
ADEMO9.DEF
< prev
next >
Wrap
Text File
|
1992-09-01
|
3KB
|
75 lines
.TUTORIAL - The GENERAL, ExecSWAP and ExecPROC units
This example shows how to use swap-to-disk.
ExecSWAP & ExecPROC
The EXEC*.DOC files have technical details on usage. SHAZAM
simplifies use of these units, via the "/x" and "/u" switches.
/U+
This unitizes the program, encapsulating the generated application.
The INTERFACE section of the unit (*_U.PAS) contains only a "GO"
procedure; the main program (*.PAS) calls this procedure.
/X+
This option causes the ExecSWAP and ExecPROC units to be added to the
proper USES clause. To minimize resident overhead when swapping, the
ExecSWAP unit is placed LAST in the USES clause of the main program;
when "unitized", the ExecPROC unit is added to the main unit
(*_U.PAS).
For EXEC calls, use the EXEC routine in ExecPROC; to avoid confusion,
use the fully-qualified name: "ExecProc.EXEC" instead of "DOS.Exec".
/O+ and /O1+
These force the use of overlays and remap the buffer to the top of
the heap. If remapped, the overlay heap can be recovered for EXEC
calls, when swapping is not possible or desired. See the init unit
(*_I.PAS) for any generated program.
GENERAL.PAS
The "shell" routines are pre-defined in this unit, and use
"VisionExec", which does the following:
[X] Saves & Restores the Desktop
[X] Turbo Vision shutdown & restart
[X] Maximizes the amount of memory for the child process under all
conditions.
NOTES
=====
1. Try each "DOS Shell" option, check available memory using the
"MEM" command at the DOS prompt.
2. This is last of the true blue tutorials, but you'll find more
feature demonstrations plus many tips and tricks for both SHAZAM
and Turbo Vision in the other examples.
@PA - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ SWITCH ]
/x+/u+/o+/o1+ @@ ExecSWAP, Unitize, Overlays & Remap ON
[ UNIT ]
General
[ EXTERNAL ]
Open @@ re-use old
DOSShell,LittleDOS,MediumDOS,BigDOS @@ GENERAL unit
[ SUBMENU ] File ;;file management
open f3 ;;open a file @@ *.EVT file
save f2 ;;save current window @@ EDITORS.PAS internal
[ NEWLINE ]
[ NEWSUB ] 'DOS shell' ;;access DOS command-line
'Little DOS' Ctrl-O ;;instant access with available memory
'Medium DOS' ;;quick access, maximum memory without swap
'Big DOS' Alt-O ;;swap to EMS or disk, access with maximum memory
[ENDSUB]
E~x~it alt-x cmQuit ;;quit program, return to DOS